For assistance, see Flexible Attributes support in the Zen Cart support forum.
If you would like to support development of this mod, you can make a Paypal donation to simonokewode@hotmail.com.
This file is part of Flexible Attributes.
Flexible Attributes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Flexible Attributes is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Flexible Attributes. If not, see http://www.gnu.org/licenses/.
This mod allows control over the display of individual attributes. Each attribute can be styled globally to affect it in all products which use it, or with a per-product stylesheet to affect its display in only one product.
Modified files included:
After unzipping the files on your computer, follow the folder tree to /includes/modules/your_template/, and to /includes/templates/your_template/. Rename the /your_template/ folders in each case to the folder name of the custom template you are using.
After making any necessary file edits, ftp the /includes/ folder to the root of your store on the server. The files will automatically be placed in the correct locations.
If you have any existing modifications to the files listed above, you will have to merge them with the version here.
If you want to increase the length of Option Name comments allowed from the standard 64 characters, you will need to modify a database setting.
In your admin > Tools > Install SQL Patches, you may copy and paste this code and send (only do this if you need to):
For up to 255 characters:
ALTER TABLE products_options MODIFY products_options_comment VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
or for longer comments:
ALTER TABLE products_options MODIFY products_options_comment TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;
You will want to edit stylesheet_flexible_attributes.css as shown below to give attributes the appearance you desire.The attributes will be given unique ids which can be addressed in your stylesheet, like #wAttrib-11. The number is the Option Name id.
stylesheet_flexible_attributes.css includes examples of some of the kinds of styling you may want to apply to various attributes. Copy and modify as desired. Adjust the #wAttrib- numbers to apply to your specific attributes.
.wrapperAttribsOptions label {font-size: 1.0em;}/*make "label" elements match other text*/
h3#attribsOptionsText {display: none;}/*hide the "Please Choose:" heading*/
h4.optionName {font-size: 1.0em;}
.wrapperAttribsOptions+br.clearBoth {display: none;}/*allow floated attributes to sit side by side if desired*/
#wAttrib-11 {clear: left; float: left;}
#wAttrib-12 {float: left;}/*this will sit beside #wAttrib-11*/
#wAttrib-13 {clear: left;}/*this will sit on a new line*/
#wAttrib-14 h4 {display: none;}
#wAttrib-15 h3 {font-size: 1em; font-weight: normal;}/*make comments above attribute like standard text*/
#wAttrib-35 .attribsOptions {display: none;}/*for a read-only attribute to hide all but comments*/
Comment out or delete any rules you do not wish to use.